{-# LANGUAGE OverloadedStrings #-}

import Data.List
import Text.LaTeX
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Syntax
import Text.LaTeX.Packages.Graphicx
import Text.LaTeX.Packages.Geometry
import Util

main :: IO ()
main = printdoc doc

doc :: Monad m => LaTeXT_ m
doc = do
    mapM_ thing [(r, t + r / 9) | r <- [0.35, 0.4 .. 0.9], t <- [0, pi / 64 .. pi * 127 / 64]]
    textblock' (vw 0.5) (vh 0.5) "meow"

thing :: Monad m => (Double, Double) -> LaTeXT_ m
thing (r, t) = textblock' (vw $ 0.5 + r * (cos t)) (vw $ sqrt 2 / 2 + r * (sin t)) $ rotatebox' (-90 + 90 * (t + r * 4) / pi) $ fontsize (vh . (\x -> (fromInteger $ ceiling $ x * 200) / 200.0) $ 0.015 + (r) / 16) (vh 0) $ "meow meow meow"
